-
Notifications
You must be signed in to change notification settings - Fork 6.5k
feat(redis): Allow loading credentials from a mounted file path #23487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
❌ Preview Environment deleted from BunnyshellAvailable commands (reply to this comment):
|
anandf
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #23487 +/- ##
=======================================
Coverage 60.36% 60.36%
=======================================
Files 350 350
Lines 60036 60070 +34
=======================================
+ Hits 36242 36264 +22
- Misses 20877 20894 +17
+ Partials 2917 2912 -5 ☔ View full report in Codecov by Sentry. |
ishitasequeira
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall code looks good!! Can we add some documentation about the feature?
|
@ishitasequeira , I have added documentation for the new Redis credentials file-mount feature in the FAQ section. |
|
|
||
| | Variable Name | Description | | ||
| |-------------------------|-----------------------------------------------| | ||
| | `REDIS_CREDS_FILE_PATH` | Path to the directory containing credential files | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR should update the default kustomize manifests in manifests/ to use that variable and mount the argocd-redis secret
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have updated the default kustomize manifests as well as the ha.
|
LGTM |
argoproj#23774) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Mangaal <[email protected]>
…ties (argoproj#23787) Signed-off-by: xiaopeng <[email protected]> Signed-off-by: Mangaal <[email protected]>
Signed-off-by: Mangaal <[email protected]>
Signed-off-by: Mangaal <[email protected]>
Signed-off-by: Mangaal <[email protected]>
Signed-off-by: Mangaal <[email protected]>
Signed-off-by: warjiang <[email protected]> Signed-off-by: Mangaal <[email protected]>
…st/container (argoproj#23800) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Mangaal <[email protected]>
Signed-off-by: Mangaal <[email protected]>
Signed-off-by: Mangaal <[email protected]>
…proj#23643) (argoproj#23644) Signed-off-by: Michael Crenshaw <[email protected]> Co-authored-by: rumstead <[email protected]> Signed-off-by: Mangaal <[email protected]>
…ks (argoproj#24421) Signed-off-by: Aamir017 <[email protected]> Signed-off-by: Mangaal <[email protected]>
Signed-off-by: Grégoire Salamin <[email protected]> Signed-off-by: Mangaal <[email protected]>
…goproj#24445) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Mangaal <[email protected]>
…4443) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Mangaal <[email protected]>
…j#24413) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Mangaal <[email protected]>
Signed-off-by: Navaneethan <[email protected]> Signed-off-by: Mangaal <[email protected]>
Signed-off-by: Fox Danger Piacenti <[email protected]> Signed-off-by: Mangaal <[email protected]>
…1.23.2 (argoproj#24442) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Mangaal <[email protected]>
Signed-off-by: Michael Crenshaw <[email protected]> Signed-off-by: Mangaal <[email protected]>
…4441) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Mangaal <[email protected]>
Signed-off-by: CI <[email protected]> Co-authored-by: CI <[email protected]> Signed-off-by: Mangaal <[email protected]>
…goproj#24415) Signed-off-by: Pavel Aborilov <[email protected]> Signed-off-by: Mangaal <[email protected]>
Signed-off-by: Michael Crenshaw <[email protected]> Signed-off-by: Mangaal <[email protected]>
…appset (argoproj#23900) Signed-off-by: nitishfy <[email protected]> Co-authored-by: Alexandre Gaudreault <[email protected]> Signed-off-by: Mangaal <[email protected]>
Signed-off-by: Peter Jiang <[email protected]> Signed-off-by: Mangaal <[email protected]>
…roj#24436) Signed-off-by: Michael Crenshaw <[email protected]> Signed-off-by: Mangaal <[email protected]>
…#24444) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Mangaal <[email protected]>
…4472) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Mangaal <[email protected]>
…cript does not exist argoproj#24490 (argoproj#24491) Signed-off-by: Codey Jenkins <[email protected]> Signed-off-by: Mangaal <[email protected]>
Signed-off-by: Mangaal <[email protected]>
174b4a3 to
eb7c25c
Compare
…ets-via-volume-mount
Signed-off-by: Mangaal <[email protected]>
…ets-via-volume-mount
…/argo-cd into secrets-via-volume-mount
|
Closing this PR due to rebase issues. I’ve created a new PR with the same fix here: [#24597]. Please continue the discussion/review there. |
Description
This PR introduces a more secure method for providing Redis credentials to Argo CD components by allowing them to be loaded from a specified file path. Currently, Redis credentials (password, username, sentinel credentials) are configured via environment variables (e.g., REDIS_PASSWORD). Storing secrets in environment variables is a common practice but can be less secure than using file-based secrets.
This change is backward-compatible. Existing setups using environment variables will continue to work without any modification
Proposed Change
This PR introduces a new mechanism to load Redis credentials from files:
REDIS_CREDS_FILE_PATH, is introduced. This variable should point to a directory where credential files are mounted.REDIS_CREDS_FILE_PATHis set, Argo CD will attempt to read credentials from the following files within that directory:auth: The password for the main Redis connection.auth_username: The username for the main Redis connection.sentinel_auth: The password for Redis Sentinel connections.sentinel_username: The username for Redis Sentinel connections.REDIS_CREDS_FILE_PATHis not set, or if a specific credential file does not exist, the system gracefully falls back to using the corresponding environment variables (REDIS_PASSWORD,REDIS_USERNAME, etc.). This ensures full backward compatibility.Implementation Details
REDIS_CREDS_FILE_PATHenvironment variable. If present, it calls loadRedisCredsFromFile and then checks if any credentials still need to be populated from the environment variables.How to Test This Change
Mount the Secret into your Argo CD pods (e.g., argocd-repo-server, argocd-application-controller) and set the new environment variable.
Related Issue
Fixes #20619